<template>
    <div class="wrapper">
        <van-swipe :autoplay="3000">
            <van-swipe-item v-for="(image, index) in images" :key="index">
                <img style="width: 100%;" :src="image.imgUrl"/>
            </van-swipe-item>
        </van-swipe>
    </div>

</template>

<script>
    import {Lazyload} from 'vant';

    export default {
        name: "HomeTop",
        data() {
            return {
                publicPath: process.env.BASE_URL,
                components: {
                    Lazyload
                },
                images: []
            }
        },
        mounted() {
            this.allSwiper();
        },
        methods: {
            allSwiper() {
                this.getRequest("/home/RoChart/rcImage/").then(resp => {
                    if (resp) {
                        this.images = resp.data;
                    }
                })
            }
        }

    }
</script>

<style scoped>

</style>